package com.heima.user.feign;

import com.heima.apis.user.IUserClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.UserRelatinDto;
import com.heima.user.service.ApFollowService;
import com.heima.user.service.ApUserService;
import com.heima.user.service.impl.ApFollowServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@RestController

public class UserClient  {
    @Autowired
    ApFollowService apFollowService;
    @Autowired
    private ApUserService apUserService;
    @PostMapping("/api/v1/u/user_follow")
    public ResponseResult followhandle(@RequestBody UserRelatinDto userRelatinDto) {
      return apFollowService.followhandle(userRelatinDto);
    }

    @PostMapping("/api/v1/auth/findUserById/{id}")
    public ResponseResult findUserById(@PathVariable("id") Long userId){
        return apUserService.findUserById(userId);
    }
}
